Technical Q&As


QD 01 - PPDs (1-May-95)


Q I know where the PPDs are located (System Folder:Extensions:Printer Descriptions), but how can I know what file reflects the current printer?

A To find the PPD associated with the current printer, you should use the PrGeneral call with the PSPrimaryPPDOp opcode as documented in the LaserWriter 8 API. Full documentation can be found on the Toolchest CD in the Developer CD series.

The relevant portions of the header file follow:

enum {		/* new PrGeneral selectors */
	getPSInfoOp = 10,
	PSIntentionsOp = 11,
	PSAdobeOp = 14,
	PSPrimaryPPDOp = 15
};

struct TPSPrimaryPPD{
	short	iOpCode;
	short	iError;
	long	lReserved;
	short	ppdIsRealFile;
	FFSpec	ppdFile;
};

typedef struct TPSPrimaryPPD TPSPrimaryPPD;



Technical Q&As
Contents | Next Question